package com.ruoyi.stock.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.stock.domain.StockUserHeaderSettting;
import com.ruoyi.stock.mapper.StockUserHeaderSetttingMapper;
import com.ruoyi.stock.service.IStockUserHeaderSetttingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 头设置
Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-07
 */
@Service
public class StockUserHeaderSetttingServiceImpl implements IStockUserHeaderSetttingService 
{
    @Autowired
    private StockUserHeaderSetttingMapper stockUserHeaderSetttingMapper;

    /**
     * 查询头设置

     * 
     * @param id 头设置
主键
     * @return 头设置

     */
    @Override
    public StockUserHeaderSettting selectStockUserHeaderSetttingById(Long id)
    {
        return stockUserHeaderSetttingMapper.selectStockUserHeaderSetttingById(id);
    }

    /**
     * 查询头设置
列表
     * 
     * @param stockUserHeaderSettting 头设置

     * @return 头设置

     */
    @Override
    public List<StockUserHeaderSettting> selectStockUserHeaderSetttingList(StockUserHeaderSettting stockUserHeaderSettting)
    {
        return stockUserHeaderSetttingMapper.selectStockUserHeaderSetttingList(stockUserHeaderSettting);
    }

    /**
     * 新增头设置

     * 
     * @param stockUserHeaderSettting 头设置

     * @return 结果
     */
    @Override
    public int insertStockUserHeaderSettting(StockUserHeaderSettting stockUserHeaderSettting)
    {
        stockUserHeaderSettting.setCreateTime(DateUtils.getNowDate());
        return stockUserHeaderSetttingMapper.insertStockUserHeaderSettting(stockUserHeaderSettting);
    }

    /**
     * 修改头设置

     * 
     * @param stockUserHeaderSettting 头设置

     * @return 结果
     */
    @Override
    public int updateStockUserHeaderSettting(StockUserHeaderSettting stockUserHeaderSettting)
    {
        stockUserHeaderSettting.setUpdateTime(DateUtils.getNowDate());
        return stockUserHeaderSetttingMapper.updateStockUserHeaderSettting(stockUserHeaderSettting);
    }

    /**
     * 批量删除头设置

     * 
     * @param ids 需要删除的头设置
主键
     * @return 结果
     */
    @Override
    public int deleteStockUserHeaderSetttingByIds(Long[] ids)
    {
        return stockUserHeaderSetttingMapper.deleteStockUserHeaderSetttingByIds(ids);
    }

    @Override
    public int deleteStockUserHeaderSetttingByUserId(Long userid) {
        return stockUserHeaderSetttingMapper.deleteStockUserHeaderSetttingByUserId(userid);
    }

    /**
     * 删除头设置
信息
     * 
     * @param id 头设置
主键
     * @return 结果
     */
    @Override
    public int deleteStockUserHeaderSetttingById(Long id)
    {
        return stockUserHeaderSetttingMapper.deleteStockUserHeaderSetttingById(id);
    }
}
